Echo (computing)
In computer telecommunications, echo is the display or return of sent data at or to the sending end of a transmission. Echo can be either local echo, where the sending device itself displays the sent data, or remote echo, where the receiving device returns the sent data that it receives to the sender (which is of course simply no local echo from the point of view of the sending device itself). That latter, when used as a form of error detection to determine that data received at the remote end of a communications line are the same as data sent, is also known as echoplex, echo check, or loop check. When two modems are communicating in echoplex mode, for example, the remote modem echoes whatever it receives from the local modem.
Terminological confusion: echo is not duplex
Whilst local echo and remote echo are sometimes referred to as "half-duplex" and "full-duplex", those latter appellations are strictly incorrect, and are misleading. (See duplex (telecommunications) for their correct meanings.) Whilst local echo is often used with half-duplex transmission, so that bandwidth is not wasted upon remotely echoing data from the remote end of the communications channel, it is not the same as half-duplex transmission. A full-duplex communications channel can still employ local echo, and a half-duplex channel can still (albeit wastefully) employ remote echo, or no echo at all.
Indeed, for example, that is the case for echoplex error checking, which requires full-duplex communication, so that received data can be echoed back as they are being received.
Similarly, for another example, in the case of the TELNET communications protocol a local echo protocol operates on top of a full-duplex underlying protocol. The TCP connection over which the TELNET protocol is layered provides a full-duplex connection, with no echo, across which data may be sent in either direction simultaneously. Whereas the Network Virtual Terminal that the TELNET protocol itself incorporates is a half-duplex device with (by default) local echo.
The devices that echo locally
terminals are one of the things that may perform echoing for a connection. Others include modems, some form of intervening communications processor, or even the host system itself. For several common computer operating systems, it is the host system itself that performs the echoing, if appropriate (which it isn't for, say, entry of a user password when a terminal first connects and a user is prompted to log in). On OpenVMS, for example, echoing is performed as necessary by the host system. Similarly, on BSD version 4, local echo is performed by the operating system kernel's terminal device driver, according to the state of a device control flag, maintained in software and alterable by applications programs via an ioctl()
system call. The actual terminals and modems connected to such systems should have their local echo facilities switched off (so that they operate in no echo mode), lest passwords be locally echoed at password prompts, and all other input appear echoed twice. This is as true for terminal emulator programs, such as C-Kermit, running on a computer as it is for real terminals.
Controlling local echo
Terminal emulators
Most terminal emulator programs have the ability to perform echo locally (which sometimes they mis-name "half-duplex"):
- In the C-Kermit terminal emulator program, local echo is controlled by the SET TERMINAL ECHO command, which can be either SET TERMINAL ECHO LOCAL (which enables local echoing within the terminal emulator program itself) or SET TERMINAL ECHO REMOTE (where disables local echoing, leaving that up to another device in the communications channel — be that the modem or the remote host system — to perform as appropriate).
- In ProComm it is the <kbd class="keyboard-key" style="border: 1px solid; border-color: #ddd #bbb #bbb #ddd; border-bottom-width: 2px; -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; background-color: #f9f9f9; padding: 1px 3px; font-family: inherit; font-size: 0.85em; white-space: nowrap;">Alt</kbd>+<kbd class="keyboard-key" style="border: 1px solid; border-color: #ddd #bbb #bbb #ddd; border-bottom-width: 2px; -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; background-color: #f9f9f9; padding: 1px 3px; font-family: inherit; font-size: 0.85em; white-space: nowrap;">E</kbd> combination, which is a hot key that may be used at any time to toggle local echo on and off.
- In the Terminal program that came with Microsoft Windows 3.1, local echo is controlled by a checkbox in the "Terminal Preferences" dialogue box accessed from the menu of the terminal program's window.
Modems
In the Hayes command set, the AT command that switches local echo off (in command mode) is E0 and the command to switch it on is E1. For local echo in data mode, the commands are F1 and F0 respectively. (Note the reversal of the numbers. The "F" commands are not part of the EIA/TIA-602 standard, but the "E" commands are.)
Host systems
Some host systems perform local echo themselves, in their device drivers and so forth.
- In Unix and POSIX-compatible systems, local echo is a flag in the POSIX terminal interface, settable programmatically with the tcsetattr() function.[fn 1] The echoing is performed by the operating system's terminal device (in some way that is not specified by the POSIX standard). The standard utility program that alters this flag programmatically is the stty command, using which the flag may be altered from shell scripts or an interactive shell. The command to turn local echo (by the host system) on is stty echo and the command to turn it off is stty -echo.[fn 2]
- On OpenVMS systems, the operating system's terminal driver normally performs echoing. The terminal characteristic that controls whether it does this is the
ECHO
characteristic, settable with the DCL command SET TERMINAL /ECHO and unsettable with SET TERMINAL /NOECHO. [fn 3]
- ^ In the older and superseded BSD version 4 terminal interface and Seventh Edition Unix terminal interface it was settable via the ioctl() system call.
- ^ This may not seem to work if used interactively. It does work. It's just immediately overridden. Some shells, such as tcsh, reset the terminal modes, including turning local echo off, when they are about to prompt for input. They actually place the terminal into non-canonical mode with local echo off, and handle echoing themselves, restoring the prior terminal attributes when the input line has been read. Any shell or other program that uses GNU readline also exhibits this interaction with stty -echo.
- ^ Note that this is not the same as the
LOCAL_ECHO
terminal characteristic, settable with the DCL command SET TERMINAL /LOCAL_ECHO and unsettable with SET TERMINAL /NOLOCAL_ECHO. That characteristic controls whether the terminal itself performs local echo.
References
What supports what
Sources used
- Bagad, V.S.; Dhotre, I.A. (2009). Data Communication & Networking. Technical Publications. ISBN 9788184317596.
- Black, Uyless D. (1987). Data communications and distributed networks (2nd ed.). Prentice-Hall. ISBN 9780835913416.
- Bigelow, Stephen J. (2000). PC Technician's Troubleshooting Pocket Reference (2nd ed.). McGraw-Hill Professional. ISBN 9780072129458.
- Cowart, Robert (1992). Mastering Windows 3.1. Sybex. ISBN 9780895888426.
- Daintith, John (2004). "echo". Oxford dictionary of computing (5th ed.). Oxford University Press. ISBN 9780198608776.
- Da Cruz, Frank; Gianone, Christine M. (1997). Using C-Kermit: communication software (2nd ed.). Digital Press. ISBN 9781555581640.
- Duffy, Michael D. (2002). Getting started with OpenVMS: a guide for new users. Digital Press. ISBN 9781555582791.
- Durda, Frank (2004). "Section 3: Unprefixed AT Commands". The AT Command Set Reference. http://nemesis.lonestar.org./reference/telecom/modems/at/plain-at.html.
- Graf, Rudolf F. (1999). "echo". Modern dictionary of electronics (6th ed.). Newnes. ISBN 9780750698665.
- Hill Associates (2002). Telecommunications: a beginner's guide. Network professional's library. McGraw-Hill Professional. ISBN 9780072193565.
- IBM (June 1995) (PDF). Telnet and the Telnet Protocol. http://bandwidthco.com./whitepapers/netforensics/telnet/Telnet%20and%20the%20Telnet%20Protocol.pdf.
- Jordan, Larry E.; Churchill, Bruce (1987). Communications and networking for the IBM PC & compatibles (2nd ed.). Brady. ISBN 9780893036348.
- Leffler, Samuel J.; McKusick, Marshall Kirk; Karels, Michael J.; Quarterman, John S. (1989). "Terminal Handling". The Design and implementation of the 4.3BSD UNIX operating system. Addison-Wesley series in computer science. Addison-Wesley. ISBN 9780201061963.
- Leisner, K. M.; Cook, David B. (1990). VAX DCL programmer's reference VMS 5. Van Nostrand Reinhold. ISBN 9780442318345.
- Miller, David Donald (1992). VAX/VMS: operating system concepts. VAX-VMS Series. Digital Press. ISBN 9781555580650.
- Norton, Peter; Kent, Peter (1993). Peter Norton's user's guide to Windows 3.1. Bantam Books. ISBN 9780553371482.
- Ramey, Chet, ed (2009). "2.5 Readline Signal Handling". GNU Readline Library. http://tiswww.case.edu./php/chet/readline/readline.html#SEC43.
- Postel, Jon; Reynolds, J. (May 1983). "Motivation for the Option". RFC 0857: TELNET ECHO OPTION. http://tools.ietf.org./html/rfc0857#section-4.
- Robbins, Kay A.; Robbins, Steven (2003). UNIX systems programming: communication, concurrency, and threads (2nd ed.). Prentice Hall PTR. ISBN 9780130424112.
- Rosch, Winn L. (1999). Winn L. Rosch hardware bible (5th ed.). Que. ISBN 9780789717436.
- Sheldon, Thomas (1991). Windows 3: the complete reference. Osborne McGraw-Hill. ISBN 9780078816796.
- Sobell, Mark G.; Seebach, Peter (2006). A practical guide to Unix for Mac OS X users. Prentice Hall PTR. ISBN 9780131863330.
- Socolofsky, T.; Kale, C. (January 1991). "Transmission Control Protocol". RFC 1180: A TCP/IP Tutorial. http://tools.ietf.org./html/rfc1180#section-7.
- Weik, Martin H. (2000). Computer Science and Communications Dictionary. 1. Springer. ISBN 9780792384250.
- Woggon, Michele (1995). Telecommunications using ProComm & ProComm Plus made easy. Prentice Hall. ISBN 9780131484122.
- "local echo". Advanced learner's dictionary of journalism. Advanced Learner's Dictionary Series. Anmol Publications PVT LTD. 2000. ISBN 9788126104697.